home *** CD-ROM | disk | FTP | other *** search
/ CyberMycha 2003 May / cmycha200305.iso / MutantStorm / setup_mutantstorm_demo.exe / {app} / script / robot_yellow.lua < prev    next >
Text File  |  2003-03-11  |  3KB  |  111 lines

  1. bullet_name = "bullet-robo"
  2. dofile_lua( bullet_name )
  3.  
  4. -- leave me
  5.     local actor = ACTOR_preload()
  6. -- leave me
  7.  
  8.     -- default for this beastie
  9.     actor[cp_actor_name]        = "robot_yellow"
  10.     actor[cp_model_dir]            = "beasties"
  11.     actor[cp_model_name]        = "robo-y"
  12.  
  13.     actor[cp_hit_delay]            = 3.0
  14.  
  15.     actor[cp_move_type]            = cmt_track + cmt_anim_to_move + cmt_repelled
  16.  
  17.     actor[cp_actor_type]            = cat_robot
  18. --    actor[cp_i_collide_with_beasties]    = cat_player + cat_robot
  19. --    actor[cp_these_collide_with_me]        = cat_player + cat_bullet + cat_robot
  20. --    actor[cp_i_avoid_these_beasties]    = cat_block + cat_robot + cat_blocker
  21.  
  22.     actor[cp_i_am_repelled_by]        = cat_block + cat_blocker + cat_robot + cat_webblob
  23.     actor[cp_repel_dist]            = 5.0
  24.  
  25.     actor[cp_score]                = 300
  26.     actor[cp_bonus_seq_hit]        = 3
  27.     actor[cp_bonus_seq_score]    = 3000
  28.  
  29.     actor[cp_hit_power]            = 5.0
  30.  
  31.     -- movement
  32.     actor[cp_move_speed_min]    = 0.8
  33.     actor[cp_move_speed_max]    = 0.12
  34.  
  35.     actor[cp_look_ahead_dist]        = 2.0
  36.     actor[cp_target_stop_dist]        = 3.0
  37.  
  38.     actor[cp_turn_lock_angle_inner]        = 85.0
  39.     actor[cp_turn_lock_angle_outer]        = 95.0
  40.     actor[cp_turn_speed_still]            = 3.0
  41.     actor[cp_turn_acceleration_still]    = 0.3
  42.     actor[cp_turn_inertia_still]        = 0.0
  43.     actor[cp_turn_speed_moving]            = 2.0
  44.     actor[cp_turn_acceleration_moving]    = 0.3
  45.     actor[cp_turn_inertia_moving]        = 0.0
  46.  
  47.     actor[cp_weight]                = 30000.0
  48.     actor[cp_launch_scale_min]        = 32.5
  49.     actor[cp_launch_scale_max]        = 37.5
  50.  
  51.     actor[cp_launch_hue_shift] = color - 100
  52.  
  53.     actor[cp_health_percent]        = 8000.0
  54.  
  55.     actor[cp_multiple_beast_shoot_rate]    = 1.0
  56.     actor[cp_multiple_beast_base_num]    = 1.0
  57.  
  58.  
  59.     actor[cp_difficulty_adjust_shoot] = 90.0
  60.  
  61. -- leave me
  62.     c_preload_model( actor )
  63. -- leave me
  64.  
  65.     c_set_random_anim( "pulse", 100.0, 130.0, 0.0, 0.0 )
  66.     c_set_random_anim( "blink", 65.0, 105.0, 0.0, 1.0 )
  67.  
  68.     c_set_random_anim( "sing", 100.0, 100.0, 0.0, 5.0 )    
  69.     c_add_sound_to_anim( "sing", "robo-sing3", 50 )    
  70.  
  71.     c_add_particle_to_anim( "emerge", "mainbody", "robo-y_emerge" )
  72.     c_add_particle_to_anim( "emerge", "mainbody", "robo-y_emergepad" )
  73.  
  74.     c_add_particle_to_anim( "mutate", "mainbody", "robo-g_mutate" )
  75.     c_add_particle_to_anim( "mutate", "mainbody", "robo-g_mutate2" )
  76.  
  77.     c_add_sound_to_anim( "emerge", "robo-y_emerge", 150 )
  78.     c_add_sound_to_anim( "mutate", "robo-y_mutate" )
  79.     c_add_sound_to_anim( "walk", "robo_step", 1 )
  80.     c_add_sound_to_event( "hit_active_bone", "robo_hit_y" )
  81.  
  82.     c_set_use_anim_for( "move_forward", "walk", 95.0, 105.0 )
  83.  
  84.     local boo = WEAPON_preload( bullet_name )
  85.     boo[w_gun_bone_name]        = "bodymesh"
  86.     boo[w_shaft_bone_name]        = "bodymesh"
  87.     boo[w_fire_anim_name]        = "fire"
  88.     boo[w_flare_exp_name]        = "robo_yellow_flare"
  89.     boo[w_flare_exp_scale]        = 600.0
  90.     boo[w_gun_type]                = "no_bone_aim"
  91.     boo[w_aim_delay]            = 1.0
  92.     boo[w_bullet_scale]            = 65.0
  93.     boo[w_barrel_offset]        = 2.0
  94.     boo[w_no_shoot_dist]        = 9.0
  95.     boo[w_no_shoot_angle]        = 0.0
  96.     boo[w_reload_random]        = 100.0
  97.     local seq = { 3.0 }
  98.     WEAPON_add( boo, seq )
  99.  
  100.     local seq = { 0.0, 0.04, 0.1 }
  101.     c_set_use_explosion_for( "bye_bye", "robo_yellow", exp_no_align, 30.0, 0.0, 1300.0, 1600.0, seq )
  102.     c_add_sound_to_explosion( "robo_yellow", "explode", "robo-y_death" )
  103.  
  104.     c_set_use_explosion_for( "bye_bye", "robo_yellow_flash", exp_no_align, 0.0, 0.5, 3000.0, 3000.0, {0.0} )
  105.     c_add_particle_to_explosion( "robo_yellow_flash", "explode", "", "robo-y_flash" )
  106.  
  107.     -- default for this beastie
  108.  
  109.     -- new state
  110.     -- new state
  111.